package com.startech.common.pojo.vo;

import lombok.Data;

@Data
public class Result {
    private Integer code;
    private String msg;
    private Object data;
    public static Result success(Object data){
        Result result = new Result();
        result.setCode(1);
        result.setMsg("success");
        result.setData(data);
        return result;
    }

    public static Result error(Object data,String msg){
        Result result = new Result();
        result.setData(data);
        result.setCode(0);
        result.setMsg(msg);
        return result;
    }
}
